angular.module('vote').controller('qrcodeCtrl', ['$scope', '$uibModalInstance', '$http', 'id', function ($scope, $uibModalInstance, $http, id) {
    $scope.img = '';
    $scope.onInit = function () {
        $http.get(ctx + '/vote/getQrcodeUrl/' + id).then(function (resp) {
            $scope.img = resp.data.url;
        });
    }
    $scope.onInit();
    $scope.ok = function () {
        $uibModalInstance.close();
    };
}]);